import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {CalendarComponent} from "./input/calendar/calendar.component";
import {FormFileComponent} from "./input/formFile/formFile.component";
import {TableComponent} from "./data/table/table.component";
import {FormFieldDemoComponent} from "./input/formField/formField.component";
import {EqualValidatorComponent} from "./validator/equal/equal.component";
import {MessageComponent} from "./message/message.component";
import {TreeComponent} from "./data/tree/tree.component";

const routes: Routes = [
  {
    path: 'button', loadChildren: './button/button.module#ButtonModule'
  },
  {
    path: 'input', children: [
      {path: 'calendar', component: CalendarComponent},
      {path: 'formFile', component: FormFileComponent},
      {path: 'formField', component: FormFieldDemoComponent}
    ]
  },
  {
    path: 'data', children: [
      {path: 'table', component: TableComponent},
      {path: 'tree', component: TreeComponent}
    ]
  },
  {
    path: 'validator', children: [
      {path: 'equal', component: EqualValidatorComponent}
    ]
  },
  {
    path: 'message', children: [
      {path: '', component: MessageComponent}
    ]
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
